package com.athui.utils.explorer.metadata;

import com.athui.bean.config.ConnectInfo;
import com.athui.bean.config.DataType;
import com.athui.bean.metadata.TableMetaData;

import java.util.List;
import java.util.Map;

/**
 * @description: TODO
 * @autor: zhangzhonghui
 * @create: 2024-08-17 07:50
 * @Version: 1.0
 */
public interface MetaDataExplorer {

    /**
     * @description: TODO 数据库数据类型与flink数据类型的映射关系
     * @author: 阿辉大人
     * @return: java.util.Map<java.lang.String,com.athui.bean.DataType>
     * @create: 2024/8/17 07:51
     * @version: 1.0
    **/
    Map<String, DataType> typeMapping();

    /**
     * @description: TODO 构建 TableMetaData
     * @author: 阿辉大人
     * @param: schemaNamek 库名
     * @param: tableName 表名
     * @return: com.athui.bean.TableMetaData
     * @create: 2024/8/17 07:52
     * @version: 1.0
    **/
    TableMetaData tableMetaDataBuilder(String schemaName, String tableName);

    TableMetaData build(String schemaName,String tableName);

    List<TableMetaData> build(Map<String, String> tableMap);

    MetaDataExplorer setConnectInfo(ConnectInfo connectInfo);

}
